module.exports = (function () {
    var express = require('express');
    var router = express.Router();
    var path = require('path');
    var request = require('request').defaults({
        json: true
    });
    var summaryHelper = require('./../service/summaryHelper.js');

    router.get('/', function (req, res, next) {
        console.log(req.query);
        summaryHelper.stasticChange(req.query.prjId, req.query.startDate, req.query.endDate).then(function (data) {
            res.render(path.join(__dirname, './../views/projectSummary.jade'), {
                data: data
            });
        });
    });
    return router;
})()